/* @(#)DownloadFileVersion.java    V1.0
 *
 * Project: APEP 
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *       {CREATE_TIME} First release
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2007 Auto-Parts E-Procurement Co., Ltd. 
 *        No.251-1 Wuning Road, Shanghai, 200063, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Auto-Parts E-Procurement Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with APEP.
 *
 * Warning:
 * =============================================================================
 *   
 * 
 */
package com.apep.gw.synch;

import framework.core.*;

/*
	Author    :
	CreateTime:{CREATE_TIME}
*/
public class DownloadFileVersionSearchEvent extends SearchEvent
{

	private String m_ID = "" ; // all

	private String m_FILE_TYPE = "" ; // all

	private String m_FILE_NAME = "" ; // all

	private int m_FILE_LENGTH = Value.NULL_INT ; // all

	private String m_VERSION = "" ; // all

	private int m_MAJOR = Value.NULL_INT ; // all

	private int m_MINOR = Value.NULL_INT ; // all

	private int m_REVISION = Value.NULL_INT ; // all

	private String m_SERVER_URL = "" ; // all

	private String m_LOCAL_SAVE_PATH = "" ; // all

	private String m_STATUS = "" ; // all

	private String m_CREATE_USER_ID = "" ; // all

	private String m_CREATE_USER = "" ; // all

	private String m_CREATE_TIME = "" ; // all

	private String m_LAST_UPDATE_USER_ID = "" ; // all

	private String m_LAST_UPDATE_USER = "" ; // all

	private String m_LAST_UDATE_TIME = "" ; // all
	
	private int m_Min_Major = Value.NULL_INT;
	private int m_Min_Minor = Value.NULL_INT;
	private int m_Min_Revision = Value.NULL_INT;
		

public DownloadFileVersionSearchEvent() 
{
	super();

	setOrderField(DownloadFileVersion.ID);

}



	public String getId()
	{
		return m_ID ;
	}
	public void setId(String v)
	{
		m_ID = v;
	}

	public String getFileType()
	{
		return m_FILE_TYPE ;
	}
	public void setFileType(String v)
	{
		m_FILE_TYPE = v;
	}

	public String getFileName()
	{
		return m_FILE_NAME ;
	}
	public void setFileName(String v)
	{
		m_FILE_NAME = v;
	}

	public int getFileLength()
	{
		return m_FILE_LENGTH ;
	}
	public void setFileLength(int v)
	{
		m_FILE_LENGTH = v;
	}

	public String getVersion()
	{
		return m_VERSION ;
	}
	public void setVersion(String v)
	{
		m_VERSION = v;
	}

	public int getMajor()
	{
		return m_MAJOR ;
	}
	public void setMajor(int v)
	{
		m_MAJOR = v;
	}

	public int getMinor()
	{
		return m_MINOR ;
	}
	public void setMinor(int v)
	{
		m_MINOR = v;
	}

	public int getRevision()
	{
		return m_REVISION ;
	}
	public void setRevision(int v)
	{
		m_REVISION = v;
	}

	public String getServerUrl()
	{
		return m_SERVER_URL ;
	}
	public void setServerUrl(String v)
	{
		m_SERVER_URL = v;
	}

	public String getLocalSavePath()
	{
		return m_LOCAL_SAVE_PATH ;
	}
	public void setLocalSavePath(String v)
	{
		m_LOCAL_SAVE_PATH = v;
	}

	public String getStatus()
	{
		return m_STATUS ;
	}
	public void setStatus(String v)
	{
		m_STATUS = v;
	}

	public String getCreateUserId()
	{
		return m_CREATE_USER_ID ;
	}
	public void setCreateUserId(String v)
	{
		m_CREATE_USER_ID = v;
	}

	public String getCreateUser()
	{
		return m_CREATE_USER ;
	}
	public void setCreateUser(String v)
	{
		m_CREATE_USER = v;
	}

	public String getCreateTime()
	{
		return m_CREATE_TIME ;
	}
	public void setCreateTime(String v)
	{
		m_CREATE_TIME = v;
	}

	public String getLastUpdateUserId()
	{
		return m_LAST_UPDATE_USER_ID ;
	}
	public void setLastUpdateUserId(String v)
	{
		m_LAST_UPDATE_USER_ID = v;
	}

	public String getLastUpdateUser()
	{
		return m_LAST_UPDATE_USER ;
	}
	public void setLastUpdateUser(String v)
	{
		m_LAST_UPDATE_USER = v;
	}

	public String getLastUdateTime()
	{
		return m_LAST_UDATE_TIME ;
	}
	public void setLastUdateTime(String v)
	{
		m_LAST_UDATE_TIME = v;
	}
		


	
	public String viewId() throws Exception
	{
		return Value.view(getId());
	}
	
	public String viewFileType() throws Exception
	{
		return Value.view(getFileType());
	}
	
	public String viewFileName() throws Exception
	{
		return Value.view(getFileName());
	}
	
	public String viewFileLength() throws Exception
	{
		return Value.view(getFileLength());
	}
	
	public String viewVersion() throws Exception
	{
		return Value.view(getVersion());
	}
	
	public String viewMajor() throws Exception
	{
		return Value.view(getMajor());
	}
	
	public String viewMinor() throws Exception
	{
		return Value.view(getMinor());
	}
	
	public String viewRevision() throws Exception
	{
		return Value.view(getRevision());
	}
	
	public String viewServerUrl() throws Exception
	{
		return Value.view(getServerUrl());
	}
	
	public String viewLocalSavePath() throws Exception
	{
		return Value.view(getLocalSavePath());
	}
	
	public String viewStatus() throws Exception
	{
		return Value.view(getStatus());
	}
	
	public String viewCreateUserId() throws Exception
	{
		return Value.view(getCreateUserId());
	}
	
	public String viewCreateUser() throws Exception
	{
		return Value.view(getCreateUser());
	}
	
	public String viewCreateTime() throws Exception
	{
		return Value.view(getCreateTime());
	}
	
	public String viewLastUpdateUserId() throws Exception
	{
		return Value.view(getLastUpdateUserId());
	}
	
	public String viewLastUpdateUser() throws Exception
	{
		return Value.view(getLastUpdateUser());
	}
	
	public String viewLastUdateTime() throws Exception
	{
		return Value.view(getLastUdateTime());
	}


	public Conditions toConditions() throws Exception
	{
		Conditions c = super.toConditions();
	
	c.add(getCondition(DownloadFileVersion.ID,getId()));
	
	c.add(getCondition(DownloadFileVersion.FILE_TYPE,getFileType()));
	
	c.add(getCondition(DownloadFileVersion.FILE_NAME,getFileName()));
	
	c.add(getCondition(DownloadFileVersion.FILE_LENGTH,getFileLength()));
	
	c.add(getCondition(DownloadFileVersion.VERSION,getVersion()));
	
	c.add(getCondition(DownloadFileVersion.MAJOR,getMajor()));
	
	c.add(getCondition(DownloadFileVersion.MINOR,getMinor()));
	
	c.add(getCondition(DownloadFileVersion.REVISION,getRevision()));
	
	c.add(getCondition(DownloadFileVersion.SERVER_URL,getServerUrl()));
	
	c.add(getCondition(DownloadFileVersion.LOCAL_SAVE_PATH,getLocalSavePath()));
	
	c.add(getCondition(DownloadFileVersion.STATUS,getStatus()));
	
	c.add(getCondition(DownloadFileVersion.CREATE_USER_ID,getCreateUserId()));
	
	c.add(getCondition(DownloadFileVersion.CREATE_USER,getCreateUser()));
	
	c.add(getCondition(DownloadFileVersion.CREATE_TIME,getCreateTime()));
	
	c.add(getCondition(DownloadFileVersion.LAST_UPDATE_USER_ID,getLastUpdateUserId()));
	
	c.add(getCondition(DownloadFileVersion.LAST_UPDATE_USER,getLastUpdateUser()));
	
	c.add(getCondition(DownloadFileVersion.LAST_UDATE_TIME,getLastUdateTime()));
		
	if(getMinMajor() != Value.NULL_INT &&
		getMinMinor() != Value.NULL_INT &&
		getMinRevision() != Value.NULL_INT) {
	    c.add("lpad(major, 10, '0')||lpad(minor, 10, '0')||lpad(revision, 10, '0')<" +
	    		"lpad("+getMinMajor()+", 10, '0')||lpad("+getMinMinor()+", 10, '0')||lpad("+getMinRevision()+", 10, '0')");
	}
			
		return c ;
	}



	public int getMinMajor() {
	    return m_Min_Major;
	}



	public void setMinMajor(int min_Major) {
	    m_Min_Major = min_Major;
	}



	public int getMinMinor() {
	    return m_Min_Minor;
	}



	public void setMinMinor(int min_Minor) {
	    m_Min_Minor = min_Minor;
	}



	public int getMinRevision() {
	    return m_Min_Revision;
	}



	public void setMinRevision(int min_Revision) {
	    m_Min_Revision = min_Revision;
	}
	
//add by  start

//add by  end
}
